﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.master" Inherits="System.Web.Mvc.ViewPage<hercules.Models.Compra>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Edit
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Edit</h2>

<script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
<script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>" type="text/javascript"></script>

<% using (Html.BeginForm()) { %>
     <fieldset style="width: 700px;">
        <legend>Compra</legend>
        
        <table>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.funcionario, "Funcinário") %> <br/>
                    <%: Html.DropDownList("funcionario", String.Empty) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.funcionario) %>
                </td>
            </tr>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.fornecedor, "Fornecedor") %> <br/>
                    <%: Html.DropDownList("fornecedor", String.Empty) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.fornecedor) %>
                </td>
            </tr>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.dataEmissao, "Data Emissão") %> <br />
                    <%: Html.EditorFor(model => model.dataEmissao) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.dataEmissao) %>
                </td>
                <td>
                    <%: Html.LabelFor(model => model.baseCalculoST, "Base Calculo ST") %> <br/>
                    <%: Html.EditorFor(model => model.baseCalculoST) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.baseCalculoST) %>
                </td>
            </tr>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.valorNota, "Valor Nota") %> <br/>
                    <%: Html.EditorFor(model => model.valorNota) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.valorNota) %>
                </td>
                <td>
                    <%: Html.LabelFor(model => model.baseCalculoIcms, "Base Calculo ICMS") %> <br/>
                    <%: Html.EditorFor(model => model.baseCalculoIcms) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.baseCalculoIcms) %>
                </td>
            </tr>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.valorIcms, "Valor ICMS" )%> <br/>
                    <%: Html.EditorFor(model => model.valorIcms) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.valorIcms) %>
                </td>
            </tr>
            <tr>
                <td>
                    <%: Html.LabelFor(model => model.valorST, "Valor ST") %> <br/>
                    <%: Html.EditorFor(model => model.valorST) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.valorST) %>
                </td>
                <td>
                    <%: Html.LabelFor(model => model.statusCompra, "Status Compra") %> <br/>
                    <%: Html.EditorFor(model => model.statusCompra) %> <br/>
                    <%: Html.ValidationMessageFor(model => model.statusCompra) %>
               
                </td>
            </tr>
        </table>

        <p>
            <input type="submit" value="Salvar" />
        </p>
    </fieldset>
<% } %>

<div>
    <%: Html.ActionLink("Voltar", "Index") %>
</div>

</asp:Content>
